﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Students.Master" CodeBehind="ViewStudentFromStudentSide.aspx.vb" Inherits="SATS.ViewStudentFromStudentSide" %>
<asp:Content ID="WarningContent" ContentPlaceHolderID="WarningContent" runat="server">
    <asp:ValidationSummary ID="ValidationSummary" runat="server" />
</asp:Content>


<asp:Content ID="Instructions" ContentPlaceHolderID="Instructions" runat="server">
    <ul>
        <br />
        <br />
        <li>You can choose to either edit an existing involvement or request to add a new one</li>
        <br />
        <li>Email will be sent to overseeing faculty memeber for the organization associated with your involvement</li>
    </ul>
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <div align="center">
            <asp:Label ID="txtMain" runat="server" Font-Bold="True" Font-Size="X-Large"
                Style="left: 202px; top: 176px; float: none; height: 26px; width: 263px;"
                Text="STUDENT PROFILE" TabIndex="10"></asp:Label>
            <br />
            <asp:Label ID="lblName" runat="server"
                Font-Size="Medium" Text="Welcome"></asp:Label>
            <br />
            <asp:Label ID="lblTuID" runat="server"
                Font-Size="Small"></asp:Label>
            <br />
            <br />
            <strong>Your involvements are listed below:</strong>
            <br />
            <%--<asp:GridView ID="gvStudent" runat="server" AutoGenerateColumns="False"
                Style="z-index: 1; left: 298px; top: 236px; text-align: center; margin-top: 0px;"
                CellPadding="4" ForeColor="#333333" GridLines="None" Width="868px">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField HeaderText="Department" DataField="GetDepartment" />
                    <asp:BoundField DataField="GetOrganization" HeaderText="Organization" />
                    <asp:BoundField HeaderText="Classification" DataField="GetClassification" />
                    <asp:BoundField HeaderText="Role" DataField="GetRole" />
                    <asp:BoundField HeaderText="Start Term" DataField="GetStartTerm" />
                    <asp:BoundField HeaderText="End Term" DataField="GetEndTerm" />
                </Columns>
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                <SortedAscendingCellStyle BackColor="#FDF5AC" />
                <SortedAscendingHeaderStyle BackColor="#4D0000" />
                <SortedDescendingCellStyle BackColor="#FCF6C0" />
                <SortedDescendingHeaderStyle BackColor="#820000" />
            </asp:GridView>--%>
            <asp:GridView ID="gvStudent" runat="server" AllowPaging="True" AllowSorting="True" OnSorting="SortGridView" AutoGenerateColumns="False"
                CellPadding="4" ForeColor="#333333" GridLines="None" Width="865px">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField HeaderText="Department" DataField="DepartmentName" />
                    <asp:BoundField HeaderText="Organization" DataField="organizationName" />
                    <asp:BoundField HeaderText="Classification" DataField="classification" />
                    <asp:BoundField HeaderText="Role" DataField="role" />
                    <asp:BoundField HeaderText="Start Term" DataField="startTerm" />
                    <asp:BoundField HeaderText="End Term" DataField="endTerm" />             
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
               
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                <SortedAscendingCellStyle BackColor="#FDF5AC" />
                <SortedAscendingHeaderStyle BackColor="#4D0000" />
                <SortedDescendingCellStyle BackColor="#FCF6C0" />
                <SortedDescendingHeaderStyle BackColor="#820000" />
            </asp:GridView>
            <%-- ***TO-DO*** ControlID needs to be changed to access user's AccessNetID for the search --%>
            <asp:SqlDataSource ID="viewStudentSide" runat="server" ConnectionString="Data Source=np-stem.temple.edu;Initial Catalog=CIS4396S03;User ID=usrCIS4396S03;Password=BaT58teR" SelectCommand="
                SELECT d.DepartmentName, o.organizationName, i.classification, i.role, 
                (SELECT t.TermName WHERE i.startTerm = t.TermID) as startTerm, 
                (SELECT t2.TermName WHERE i.endTerm = t2.TermID) as endTerm, u.accessNetID
                FROM Involvments i INNER JOIN Users u ON i.tuID = u.ID
                INNER JOIN Departments d ON i.departmentID = d.DepartmentID
                INNER JOIN Organizations o ON i.organizationID = o.organizationID
                INNER JOIN Term t on i.startTerm = t.TermID
                INNER JOIN Term t2 on i.endTerm = t2.TermID"
                FilterExpression="accessNetID LIKE 'tue40076'" ProviderName="System.Data.SqlClient">
            </asp:SqlDataSource>
            <asp:LinkButton ID="lnkEditRequest" runat="server">Click here to request an update to your information</asp:LinkButton>

            <br />
            <br />

            <asp:Label ID="lblMsg2" runat="server" Font-Bold="True" Font-Names="Arial"
                Text="Your request has been submitted, thank you." ForeColor="#3399FF"></asp:Label>
            <hr />
            <asp:Label ID="lblMsg" runat="server"
                Text='Please click "Existing Record" and choose records from the table above or click on New Record'
                Style="font-size: medium"></asp:Label>
            <br />
            <br />
            <%-- ***TO-DO*** ControlID needs to be changed to access user's AccessNetID for the search --%>
            <asp:RadioButtonList ID="RadioButtonList1" runat="server" TextAlign="Right" CssClass="RadioButtonList" AutoPostBack="True">
                <asp:ListItem Value="0">New Record</asp:ListItem>
                <asp:ListItem Value="1">Edit Existing Record</asp:ListItem>
            </asp:RadioButtonList>
            <br />
            <br />
            <br />
            <div class="row-fluid">
                <div class="span4">
                    <asp:Label ID="Label1" runat="server" Text="Department: "></asp:Label>
                    <asp:DropDownList ID="ddDepartment" runat="server" Height="24px"
                     Width="156px" DataSourceID="AllDeptName" DataTextField="DepartmentName" DataValueField="DepartmentName" AppendDataBoundItems="true">
                    <asp:ListItem Text="All" Value="%"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="AllDeptName" runat="server" ConnectionString="Data Source=np-stem.temple.edu;Initial Catalog=CIS4396S03;User ID=usrCIS4396S03;Password=BaT58teR" SelectCommand="SELECT DISTINCT [DepartmentName] FROM [Departments]" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
                </div>
                <div class="span4">
                    <asp:Label ID="Label2" runat="server" Text="Organization: "></asp:Label>
                    <asp:DropDownList ID="ddOrganization" runat="server" Height="24px"
                    Width="156px" Style="margin-left: 3px" DataSourceID="AllOrganization" DataTextField="organizationName" DataValueField="organizationName" AppendDataBoundItems="true">
                    <asp:ListItem Text="All" Value="%"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="AllOrganization" runat="server" ConnectionString="Data Source=np-stem.temple.edu;Initial Catalog=CIS4396S03;User ID=usrCIS4396S03;Password=BaT58teR" SelectCommand="SELECT DISTINCT [organizationName] FROM [Organizations]" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
                </div>
                <div class="span4">
                    <asp:Label ID="Label3" runat="server" Text="Classification: "></asp:Label>
                    <asp:DropDownList ID="ddClassification" runat="server" Height="24px"
                    Width="156px" Style="margin-left: 3px" DataSourceID="AllClassification" DataTextField="classification" DataValueField="classification" AppendDataBoundItems="true">
                    <asp:ListItem Text="All" Value="%"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="AllClassification" runat="server" ConnectionString="Data Source=np-stem.temple.edu;Initial Catalog=CIS4396S03;User ID=usrCIS4396S03;Password=BaT58teR" SelectCommand="SELECT DISTINCT [classification] FROM [Involvments]" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
                </div>
            </div>
            <br />
            <div class="row-fluid">
                <div class="span4">
                    <asp:Label ID="Label4" runat="server" Text="Role: "></asp:Label>
                    <asp:DropDownList ID="ddRole" runat="server" Height="24px"
                    Width="156px" Style="margin-left: 3px" DataSourceID="AllRole" DataTextField="role" DataValueField="role" AppendDataBoundItems="true">
                    <asp:ListItem Text="All" Value="%"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="AllRole" runat="server" ConnectionString="Data Source=np-stem.temple.edu;Initial Catalog=CIS4396S03;User ID=usrCIS4396S03;Password=BaT58teR" SelectCommand="SELECT DISTINCT [role] FROM [Involvments]" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
                </div>
                <div class="span4">
                    <asp:Label ID="Label5" runat="server" Text="Start Term: "></asp:Label>
                    <asp:DropDownList ID="ddStartTerm" runat="server" Height="24px"
                    Width="156px" DataSourceID="AllStartTerm" DataTextField="TermName" DataValueField="TermName" AppendDataBoundItems="true">
                    <asp:ListItem Text="All" Value="%"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="AllStartTerm" runat="server" ConnectionString="Data Source=np-stem.temple.edu;Initial Catalog=CIS4396S03;User ID=usrCIS4396S03;Password=BaT58teR" SelectCommand="SELECT DISTINCT [TermName] FROM [Term]" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
                    <br />
                </div>
                <div class="span4">
                    <asp:Label ID="Label6" runat="server" Text="End Term: "></asp:Label>
                    <asp:DropDownList ID="ddEndTerm" runat="server" Height="24px"
                    Width="156px" DataSourceID="AllEndTerm" DataTextField="TermName" DataValueField="TermName" AppendDataBoundItems="true">
                    <asp:ListItem Text="All" Value="%"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="AllEndTerm" runat="server" ConnectionString="Data Source=np-stem.temple.edu;Initial Catalog=CIS4396S03;User ID=usrCIS4396S03;Password=BaT58teR" SelectCommand="SELECT DISTINCT [TermName] FROM [Term]" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
                </div>
            </div>
            <div class="row-fluid">
                <div class="span12">
            <asp:TextBox ID="txtComments" runat="server" Height="191px" TextMode="MultiLine" Width="436px">Comments </asp:TextBox>
                    <br />
                    <asp:Button ID="btnSubmit" runat="server" BackColor="#990000" ForeColor="White"
                        Height="30px" Text="Submit Request" Width="120px" />
                </div>
            </div>
        </div>
</asp:Content>
